package com.baize.baizeapp.test.album

import java.io.Serializable

open class ImageFolder :  Serializable {

    var name: String? = null  //当前文件夹的名字
    var path: String? = null  //当前文件夹的路径
    var cover: ImageItem? = null   //当前文件夹需要要显示的缩略图，默认为最近的一次图片
    var images = arrayListOf<ImageItem>()//当前文件夹下所有图片的集合

    fun showImagesCount(): String {
        return "(${images.size})"
    }

//    override fun isContentsTheSame(other: DiffDataCallback): Boolean {
//        return if (other is ImageItem) {
//            this.path!!.equals(other.path!!, ignoreCase = true)
//        } else false
//    }
//
//    override fun isTheSame(other: DiffDataCallback): Boolean {
//        return if (other is ImageItem) {
//            this.path!!.equals(other.path!!, ignoreCase = true)
//        } else false
//    }
//
//    override fun equals(other: Any?): Boolean {
//        return if (other is ImageFolder) {
//            this.name!!.equals(other.name!!, ignoreCase = true)
//        } else super.equals(other)
//    }
}
